#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>

class Solution {
public:
    int exchangeBits(int num) {
        int i1 = (num & 0x55555555);
        num = num >> 1;
        num = (num & 0x55555555);
        num = num | (i1 << 1);
        return num;
    }
};

int main()
{
    Solution s;
    int i = s.exchangeBits(571603718);
    return 0;
}